import {createWebHashHistory, createRouter} from 'vue-router'

const routes = [
    {
        path: '/',
        redirect: '/manage',
    },
    {
        path: '/login',
        component: () => import('@/Login.vue')
    },
    {
        path: '/manage',
        component: () => import('@/Layout.vue'),
        redirect: '/manage/device',
        children: [
            {
                path: '/manage/device',
                component: () => import('@/views/device/index.vue'),
                name: 'DeviceManage',
            },
            {
                path: '/manage/person',
                component: () => import('@/views/person/index.vue'),
                name: 'PersonManage',
            },
            {
                path: '/manage/apply-category',
                component: () => import('@/views/apply-category/index.vue'),
                name: 'ApplyCategoryManage',
            },
            {
                path: '/manage/apply',
                component: () => import('@/views/apply/index.vue'),
                name: 'ApplyManage',
            },
            {
                path: '/manage/approve',
                component: () => import('@/views/approve/index.vue'),
                name: 'ApproveManage',
            },
            {
                path: '/manage/flyer',
                component: () => import('@/views/flyer/index.vue'),
                name: 'FlyerManage',
            },
        ]
    },
]
const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
export default router

